Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add create global cluster with rds cluster role #83

Merged
merged 41 commits into from
Oct 19, 2023

Conversation

mandar242
Copy link
Contributor

@mandar242 mandar242 commented Aug 10, 2023

SUMMARY

Continuing on PR #79

Add role create_rds_global_cluster to create aurora global cluster with two different region rds clusters.

Currently, RDS resources created by role will be connect to Default VPC of the specified region.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

create_rds_global_cluster

@mandar242
Copy link
Contributor Author

Waiting on ansible-collections/amazon.aws#1705

@SCLogo
Copy link

SCLogo commented Aug 24, 2023

does it mean currently we can create Global database only in the same region?

@mandar242 mandar242 changed the title [WIP] Add create global cluster with rds cluster role Add create global cluster with rds cluster role Aug 24, 2023
@mandar242 mandar242 changed the title Add create global cluster with rds cluster role [DNM] Add create global cluster with rds cluster role Aug 29, 2023
@mandar242 mandar242 changed the title [DNM] Add create global cluster with rds cluster role Add create global cluster with rds cluster role Sep 30, 2023
@GomathiselviS
Copy link
Contributor

There are a few ansible-lint issues that need to be addressed, but aside from those, the role functions properly.

Copy link
Collaborator

@hakbailey hakbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few typos noted inline, but I also have a general comment about region. When I try to test this locally, it's picking up the aws region from test config in the Create a primary cluster for global database step of create.yaml, with a warning that Both option region and its alias aws_region are set. I think we either need to pass aws_region instead of region to the calls to amazon.aws modules, or we need to set the aws_region variable explicitly to match region. This will be an issue outside of testing for users if they have the AWS region set in ENV since the aws_setup_credentials role pulls from that to set the aws_region value.

roles/create_rds_global_cluster/README.md Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/README.md Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/README.md Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/README.md Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/README.md Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/tasks/main.yml Outdated Show resolved Hide resolved
@mandar242
Copy link
Contributor Author

mandar242 commented Oct 11, 2023

this issue is not being reproduced in my testing, role works as expected, not sure if I'm missing anything
for reference, my ~/.aws/credentials looks like below

Hmm. I'm running into the same issue when calling this role from the new high availability webapp playbook too. In that case aws_access_key, aws_secret_access_key, and aws_region variables are passed directly to the playbook via a credentials file (and aws_region is required) so I think we need to make sure region and aws_region match here.

roles/create_rds_global_cluster/tasks/create.yml Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/tasks/create.yml Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/tasks/delete.yml Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/tasks/delete.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@hakbailey hakbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple more comments otherwise this looks good!

roles/create_rds_global_cluster/defaults/main.yml Outdated Show resolved Hide resolved
roles/create_rds_global_cluster/defaults/main.yml Outdated Show resolved Hide resolved
@mandar242 mandar242 merged commit 9451a70 into redhat-cop:main Oct 19, 2023
20 checks passed
@mandar242 mandar242 deleted the global_cluster branch October 19, 2023 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants